<?php
//对地址栏那个ID的留言进行修改
require 'dbcon.php';
$e_id=isset($_GET['e_id'])?$_GET['e_id']:0;
$e_name=$_REQUEST['e_name'];//获取用户呢称
 $e_dept=$_REQUEST['e_dept'];
 $e_img=$_REQUEST['e_img'];
 $date_of_birth=$_REQUEST['date_of_birth'];
 $date_of_entry=$_REQUEST['date_of_entry'];// 获取用户留言
$sql="update tb_emp set e_name='{$e_name}',e_dept='{$e_dept}',e_img='{$e_img}',date_of_birth='{$date_of_birth}',date_of_entry='{$date_of_entry}' where e_id={$e_id}";
$rs=$db->query($sql);//执行SQL语句
 if  ($rs==true)
 {
    echo "<script language='javascript' type='text/javascript'>"; 
    //echo "alert('留言成功！');";
    echo "window.location.href='index.php';";
    echo "</script>";
 }
 else {
    echo "<script language='javascript' type='text/javascript'>"; 
    echo "alert('修改失败！');";
    echo "window.location.href='index.php';";
    echo "</script>";
}

$db->close();


